package com.chunuo.blogs.service.impl;

import com.chunuo.blogs.dao.CommentDao;
import com.chunuo.blogs.entity.Comment;
import com.chunuo.blogs.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 类的作用
 *
 * @author liujiamiao
 * @email 2544296058@qq.com
 * @date 2020-05-27 11:18
 */
@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentDao commentDao;

    @Override
    public List<Comment> findAll(Integer blogsId) {
        return commentDao.findAll(blogsId);
    }

    @Override
    public Comment save(Comment comment) {
        commentDao.save(comment);
        return comment;
    }

    @Override
    public void delete(Integer commentId) {
        commentDao.delete(commentId);
    }
}
